import type { RouteRecordRaw } from 'vue-router';
import type { RouteKey } from '@elegant-router/types';
import { layouts } from '../elegant/imports';

const ROUTE_HOME: RouteKey = 'root';

const manage: RouteRecordRaw = {
  name: ROUTE_HOME,
  path: '/',
  component: layouts.base,
  meta: {
    title: '系统管理',
    icon: 'carbon:manage'
  },
  children: [
    {
      name: 'manage_user',
      path: '/manage/user',
      component: () => import('@/views/manage/user/index.vue'),
      meta: {
        title: '用户管理',
        requiresAuth: true,
        icon: 'carbon:user'
      }
    },
    {
      name: 'manage_role',
      path: '/manage/role',
      component: () => import('@/views/manage/role/index.vue'),
      meta: {
        title: '角色管理',
        requiresAuth: true,
        icon: 'carbon:user-role'
      }
    },
    {
      name: 'manage_tenant',
      path: '/manage/tenant',
      component: () => import('@/views/manage/tenant/index.vue'),
      meta: {
        title: '租户管理',
        requiresAuth: true,
        icon: 'carbon:building'
      }
    },
    {
      name: 'manage_tenant-node-mapping',
      path: '/manage/tenant-node-mapping',
      component: () => import('@/views/manage/tenant-node-mapping/index.vue'),
      meta: {
        title: '租户-节点映射',
        requiresAuth: true,
        icon: 'carbon:connection'
      }
    },
    {
      name: 'manage_node',
      path: '/manage/node',
      component: () => import('@/views/manage/node/index.vue'),
      meta: {
        title: '节点管理',
        requiresAuth: true,
        icon: 'carbon:ibm-cloud-pak-networking'
      }
    },
    {
      name: 'manage_log',
      path: '/manage/log',
      component: () => import('@/views/manage/log/index.vue'),
      meta: {
        title: '日志监控',
        requiresAuth: true,
        icon: 'carbon:data-vis-4'
      }
    },
    {
      name: 'manage_schedule_task',
      path: '/manage/schedule-task',
      component: () => import('@/views/manage/schedule-task/index.vue'),
      meta: {
        title: '定时任务',
        i18nKey: 'route.manage_schedule-task',
        icon: 'carbon:task'
      }
    },
    {
      name: 'manage_mq_message',
      path: '/manage/mq-message',
      component: () => import('@/views/manage/mq-message/index.vue'),
      meta: {
        title: 'MQ消息管理',
        requiresAuth: true,
        icon: 'carbon:message'
      }
    },
    {
      name: 'manage_holiday',
      path: '/manage/holiday',
      component: () => import('@/views/manage/holiday/index.vue'),
      meta: {
        title: '假日管理',
        requiresAuth: true,
        icon: 'carbon:calendar'
      }
    }
    // {
    //   name: 'manage_mq_message_send',
    //   path: '/manage/mq-message/send',
    //   component: () => import('@/views/manage/mq-message/send.vue'),
    //   meta: {
    //     title: '发送MQ消息',
    //     requiresAuth: true,
    //     icon: 'carbon:send'
    //   }
    // },
    // {
    //   name: 'manage_mq_message_receive',
    //   path: '/manage/mq-message/receive',
    //   component: () => import('@/views/manage/mq-message/receive.vue'),
    //   meta: {
    //     title: '接收MQ消息',
    //     requiresAuth: true,
    //     icon: 'carbon:message-queue'
    //   }
    // },
    // {
    //   name: 'manage_mq_message_operation',
    //   path: '/manage/mq-message/operation',
    //   component: () => import('@/views/manage/mq-message/MqOperation.vue'),
    //   meta: {
    //     title: 'MQ消息操作',
    //     requiresAuth: true,
    //     icon: 'carbon:message-queue'
    //   }
    // },
    // {
    //   name: 'manage_message_test',
    //   path: '/manage/message-test',
    //   component: () => import('@/views/manage/message-test/index.vue'),
    //   meta: {
    //     title: '报文测试',
    //     requiresAuth: true,
    //     icon: 'carbon:test-tube'
    //   }
    // }
  ]
};

export default manage;
